package com.ruoyi.system.service.impl;

import java.util.Date;
import java.util.List;

import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.service.ISysUserService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysCopyMapper;
import com.ruoyi.system.domain.SysCopy;
import com.ruoyi.system.service.ISysCopyService;

/**
 * 抄送信息Service业务层处理
 *
 * @author Tony
 * @date 2023-03-18
 */
@Service
public class SysCopyServiceImpl implements ISysCopyService
{
    @Autowired
    private SysCopyMapper sysCopyMapper;

    /**
     * 查询抄送信息
     *
     * @param id 抄送信息主键
     * @return 抄送信息
     */
    @Override
    public SysCopy selectSysCopyById(Long id)
    {
        return sysCopyMapper.selectSysCopyById(id);
    }

    /**
     * 查询抄送信息列表
     *
     * @param sysCopy 抄送信息
     * @return 抄送信息
     */
    @Override
    public List<SysCopy> selectSysCopyList(SysCopy sysCopy)
    {
        return sysCopyMapper.selectSysCopyList(sysCopy);
    }

    /**
     * 新增抄送信息
     *
     * @param sysCopy 抄送信息
     * @return 结果
     */
    @Override
    public int insertSysCopy(SysCopy sysCopy)
    {
        sysCopy.setCreateTime(DateUtils.getNowDate());
        return sysCopyMapper.insertSysCopy(sysCopy);
    }


    /**
     * 修改抄送信息
     *
     * @param sysCopy 抄送信息
     * @return 结果
     */
    @Override
    public int updateSysCopy(SysCopy sysCopy)
    {
        sysCopy.setUpdateTime(DateUtils.getNowDate());
        return sysCopyMapper.updateSysCopy(sysCopy);
    }

    /**
     * 批量删除抄送信息
     *
     * @param ids 需要删除的抄送信息主键
     * @return 结果
     */
    @Override
    public int deleteSysCopyByIds(Long[] ids)
    {
        return sysCopyMapper.deleteSysCopyByIds(ids);
    }

    /**
     * 删除抄送信息信息
     *
     * @param id 抄送信息主键
     * @return 结果
     */
    @Override
    public int deleteSysCopyById(Long id)
    {
        return sysCopyMapper.deleteSysCopyById(id);
    }

    /**
     * 删除抄送信息
     *
     * @param instanceId 流程实例编号
     * @return 结果
     */
    @Override
    public int deleteSysCopyByDeployId(String instanceId) {
        return sysCopyMapper.deleteSysCopyByDeployId(instanceId);
    }
}
